import login from '../components/login.vue';
import index from '../components/index.vue';
import logo from '../components/logo.vue';
import role from '../components/system/role.vue';
import loginLog from '../components/system/loginLog.vue';
import branch from '../components/personnelManagement/BranchInfo.vue';
import DepartInfo from '../components/personnelManagement/DepartInfo.vue';
import userInfo from '../components/personnelManagement/userInfo.vue';
import addUserInfo from '../components/personnelManagement/addUserInfo.vue';
import schedule from '../components/scheduleManagement/schedule.vue';
import addSchedule from '../components/scheduleManagement/addSchedule.vue';

// 路由页面地址数组
const routes = [
    {path: "/", redirect: "/login"}, // 默认
    {path: "/login", component: login},
    {
        path: "/index", component: index,
        children: [
            {path: "/index", redirect: "/index/logo"},
            {path: "/index/logo", component: logo},
            {path: "/index/role", component: role},
            {path: "/index/loginLog", component: loginLog},
            {path: "/index/branch", component: branch},
            {path: "/index/DepartInfo", component: DepartInfo},
            {path: "/index/userInfo", component: userInfo},
            {path: "/index/addUserInfo", component: addUserInfo},
            {path: "/index/schedule", component: schedule},
            {path: "/index/addSchedule", component: addSchedule}
        ]
    }
]

export default routes;